package com.neuedu.spring;

import com.neuedu.spring.dao.IUserDao;
import com.neuedu.spring.dao.UserDao;
import com.neuedu.spring.dao.UserDaoOther;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

/**
 * 项目：spring-java4
 * 创建时间：  2022-03-18   10:24
 * 作者 :jshand
 * 描述 : 替换xml
 */
@Configuration
public class Appconfig {
//    @Bean(name = "userDao")
    @Bean() // @Bean(name=getUser)
    public IUserDao getUser(){
        return new UserDao();
    }

    @Bean(name = "userDaoOther")
    public  IUserDao getOtherUser(){
        return new UserDaoOther();
    }
}
